import axios from 'axios';

// 文件列表
export function getDictList(params) {
  return axios({
    url: `/admin/system.dict/list`,
    method: 'get',
    params,
  });
}

export function addDict(params) {
  return axios({
    url: `/admin/system.dict/create`,
    method: 'post',
    data: params,
  });
}

export function updateDict(params) {
  return axios({
    url: `/admin/system.dict/update`,
    method: 'post',
    data: params,
  });
}

export function delDict(params) {
  return axios({
    url: `/admin/system.dict/delete`,
    method: 'post',
    data: params,
  });
}

export function getDictData(params) {
  return axios({
    url: `/admin/system.dict/update`,
    method: 'get',
    params,
  });
}

// 分类列表
export function getDictDataList(params) {
  return axios({
    url: `/admin/system.dictdata/list`,
    method: 'get',
    params,
  });
}

// 创建分类
export function addDictData(params) {
  return axios({
    url: `/admin/system.dictdata/create`,
    method: 'post',
    data: params,
  });
}

// 更新分类
export function updateDictData(params) {
  return axios({
    url: `/admin/system.dictdata/update`,
    method: 'post',
    data: params,
  });
}

// 删除分类
export function delDictData(params) {
  return axios({
    url: `/admin/system.dictdata/delete`,
    method: 'post',
    data: params,
  });
}
